(Fx_popup_menu): Error if we don't get a window or a frame somehow.
authorRichard M. Stallman <rms@gnu.org>
Sat, 5 Jun 1993 17:31:54 +0000 (17:31 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sat, 5 Jun 1993 17:31:54 +0000 (17:31 +0000)
src/xmenu.c

index a5b69946b7a52f19307c13fa0c92004344a44b69..1f70766426d48e32e72be626028052afee9c14b9 100644 (file)
@@ -163,6 +163,10 @@ With this form of menu, the return value is VALUE from the chosen item.")
       XMenu_xpos = FONT_WIDTH (f->display.x->font) * XWINDOW (window)->left;
       XMenu_ypos = FONT_HEIGHT (f->display.x->font) * XWINDOW (window)->top;
     }
+  else
+    /* ??? Not really clean; should be CHECK_WINDOW_OR_FRAME,
+       but I don't want to make one now.  */
+    CHECK_WINDOW (window, 0);
 
   XMenu_xpos += FONT_WIDTH (f->display.x->font) * XINT (x);
   XMenu_ypos += FONT_HEIGHT (f->display.x->font) * XINT (y);